# -*- coding: utf-8 -*-
"""
Created on Wed Sep 11 14:54:25 2024

@author: Administrator
"""
a = 1
b = 0.24
c="0.57"
print("%s result:%f"%(type(a+b),a+b))
#unsupported operand type(s) for +: 'int' and 'str'
#print(a+c)
#float
print(float(a)+float(c))

#str convert to string
print(str(a)+str(c))

#char int to char
for i in range(0, 256):
    print("%d = %c "%(i,chr(i)))
    
# char 返回对应的 ASCII 数值
print("ord('a')=%d "%(ord('a')))
print("ord('b')=%d "%(ord('b')))
print("ord('c')=%d "%(ord('c')))

    
#repr() 函数将对象转化为供解释器读取的形式
s='helo'
print(repr(s))
myset=(1,2,3)
print(repr(myset))
dic={'a':100,'b':"hello"}
print(repr(dic))
